<template>
	<view class="content">
		<view class="form">
			<view class="formList1" v-for="(item,index) in formList1">
				<label class="label" :key="index">
					<!-- <image src="../../static/img/9.jpg" mode=""></image> -->
					<span>{{item.name}}</span>
					<input :class="item.class" type="text" :placeholder="item.placeholder">
				</label>
			</view>
			<view class="formList1" v-for="(item,index) in formList2">
				<uni-section :title="item.title" type="line">
					<uni-data-select :v-model="item.value" :localdata="item.range" @change="change"></uni-data-select>
				</uni-section>
			</view>
		</view>
		<button type="primary">确认提交</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				formList1: [{
						url: '../../static/img/requrie.png',
						name: '姓名',
						placeholder: '请填写姓名',
						class: 'twoFont'
					},
					{
						url: '../../static/img/requrie.png',
						name: '职业',
						placeholder: '请填写职业',
						class: 'twoFont'
					},
					{
						name: '身高',
						url: '../../static/img/requrie.png',
						placeholder: '请填写身高',
						class: 'twoFont'
					},
					{
						name: '体重',
						url: '../../static/img/requrie.png',
						placeholder: '请填写体重',
						class: 'twoFont'
					},
					{
						url: '../../static/img/requrie.png',
						name: '年收入',
						placeholder: '请填写年收入',
						class: 'threeFont'
					},
					{
						url: '../../static/img/requrie.png',
						name: '工作地点',
						placeholder: '请填写工作地点',
						class: ''
					},

				],
				formList2: [{
						title: '性别',
						value: null,
						range: [{
								value: 1,
								text: "男"
							},
							{
								value: 0,
								text: "女"
							}
						],
					},
					{
						title: '学历',
						value: null,
						range: [{
								value: '高中及以下',
								text: "高中及以下"
							},
							{
								value: '专科',
								text: "专科"
							},
							{
								value: '本科',
								text: "本科"
							},
							{
								value: '研究生',
								text: "研究生"
							},
							{
								value: '博士',
								text: "博士"
							},

						],
					},
					
				],
			}
		},
		methods: {
			change(e) {
				console.log("e:", e);
			},
		}
	}
</script>

<style scoped lang="scss">
	* {
		margin: 0;
		padding: 0;
	}

	.content {
		background-color: #e6e6e6;

		.form {
			background-color: #fff;
			margin-bottom: 20rpx;

			.formList1 {
				.label {
					border-bottom: 1px solid #ccc;
					width: 100%;
					display: flex;
					font-size: 14px;
					padding: 10rpx;
					margin: 20rpx 0;

					image {
						width: 40rpx;
						height: 40rpx;
					}

					input {
						margin-left: 40rpx;
					}

					.twoFont {
						margin-left: 100rpx;
					}

					.threeFont {
						margin-left: 70rpx;
					}
				}
			}

		}
	}
</style>
